<?php
require '../Models/Base/newMyPDO.class.php';

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/9/19 0019
 * Time: 11:02
 */
class getConnect
{
    /**
     * @param $member_sql
     * @return array
     *
     * 获取数据库连接
     */
    public static function getConnectData($member_sql)
    {
        $DbConfig = array(
            "dbType" => "mysql",
            "dbHost" => "localhost",
            "dbUser" => "lfplazza_cn",
            "dbPassWord" => "E7BJcewkNK",
            "dbName" => "lfplazza_cn"
        );
//        $DbConfig = array(
//            "dbType" => "mysql",
//            "dbHost" => "localhost",
//            "dbUser" => "lfmall_net",
//            "dbPassWord" => "JwRpar3iwN",
//            "dbName" => "lfmall_net"
//        );
//        $DbConfig = array(
//            "dbType" => "mysql",
//            "dbHost" => "localhost",
//            "dbUser" => "teamispower_com",
//            "dbPassWord" => "stCsMbZ2XZ",
//            "dbName" => "teamispower_com"
//        );
        $class = new newMyPDO($DbConfig);
        $res = $class->getAll($member_sql);
        return $res;
    }

    /**
     * @param $member_sql
     * @return array
     *
     * 获取数据库连接
     */
    public static function setOperateData($member_sql)
    {
        $DbConfig = array(
            "dbType" => "mysql",
            "dbHost" => "localhost",
            "dbUser" => "lfmall_net",
            "dbPassWord" => "JwRpar3iwN",
            "dbName" => "lfmall_net"
        );
        $class = new newMyPDO($DbConfig);
        $res = $class->query($member_sql);
        return $res;
    }
}